package com.yuhanginfo.modules.sys.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yuhanginfo.common.persistence.Page;
import com.yuhanginfo.common.service.CrudService;
import com.yuhanginfo.modules.sys.dao.TransactionHistoryDao;
import com.yuhanginfo.modules.sys.entity.TransactionHistory;

/**
 * 交易历史Service
 * @author lvls
 * @version 2017-09-21
 */
@Service
@Transactional(readOnly = true)
public class TransactionHistoryService extends CrudService<TransactionHistoryDao, TransactionHistory> {

	@Autowired
	private TransactionHistoryDao transactionHistoryDao;
	
	
	
	@Transactional(readOnly = false)
	public void save(TransactionHistory transactionHistory) {
		super.save(transactionHistory);
	}
	
	@Transactional(readOnly = false)
	public void delete(TransactionHistory transactionHistory) {
		super.delete(transactionHistory);
	}

	public Page<TransactionHistory> selectByUserId(Page<TransactionHistory> page,TransactionHistory entity) {
		entity.setPage(page);
		page.setList(transactionHistoryDao.selectByUserId(entity));
		return page;
	}
	
}